<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>vue</title>
        <!-- 引入vue文件-->
		<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
		<style>
			.active{
				width:100px;
				height:100px;
				background:green;
			}
			.textDanger{
				background:red;
			}
		</style>
	</head>
	<body>
		<div id="vue">
			<!-- isActive为true时,使用active样式 -->
			<div v-bind:class="json">哈哈</div>
		</div>
		<script>
			new Vue({
				el:'#vue',
				data:{
					json:{
						active:true,
						textDanger:true
					}
				}
			})
		</script>
	</body>
</html>
